﻿#include "qlay.h"
#include <QVBoxLayout>
#include <QHBoxLayout>
#include <QPushButton>
QLay::QLay(QWidget *parent) : QWidget(parent)
{
    setQLay();
//    show();
}

void QLay::setQLay()
{
    QVBoxLayout *vlay = new QVBoxLayout(this);
    for(int i = 0; i < 9; ++i)
    {
        QHBoxLayout *hlay = new QHBoxLayout();
        for(int j = 0; j < 9; ++j)
        {
            int btn_num = i * 9 + j + 1;
            QPushButton *btn = new QPushButton(QString::number(btn_num));
            hlay->addWidget(btn);
        }
        vlay->addLayout(hlay);
    }
}
